<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="banner">

    <div class="left">
        <input type="file" class="change">
    </div>
    <div class="right">
        <div class="text-1">Leago</div>
        <div class="text-2">saida</div>
    </div>
    </div>

<div class="nav top">
    <div class="left-1">
        <div class="img"></div>
        <div class="text-3">我的萌宠</div>
    </div>
    <div class="right-1">&gt</div>
</div>


<div class="nav">
    <div class="left-1">
        <div class="img"></div>
        <div class="text-3">我的萌宠</div>
    </div>
    <div class="right-1">&gt</div>
</div>



<div class="nav">
    <div class="left-1">
        <div class="img"></div>
        <div class="text-3">我的萌宠</div>
    </div>
    <div class="right-1">&gt</div>
</div>




<div class="nav">
    <div class="left-1">
        <div class="img"></div>
        <div class="text-3">我的萌宠</div>
    </div>
    <div class="right-1">&gt</div>
</div>



<div class="nav">
    <div class="left-1">
        <div class="img"></div>
        <div class="text-3">我的萌宠</div>
    </div>
    <div class="right-1">&gt</div>
</div>


<footer>
    <div class="content-2">
        <a href="../home-page/index.html" class="img-2">
        </a>
        <a href="../home-page/index.html" class="text-3">精选</a>
    </div>
    <div class="content-2">
        <a href="../classification/index.html" class="img-2">
        </a>

        <a href="../classification/index.html" class="text-3">分类</a>
    </div>
    <div class="content-2">
        <a href="../community/index.html" class="img-2">
        </a>
        <a  href="../community/index.html" class="text-3">社区</a>
    </div>
    <div class="content-2 margin-right">
        <a href="javascript:void(0)" class="img-2">
        </a>
        <a href="javascript:void(0)" class="text-3">我的</a>
    </div>
</footer>

<script>
    const text_2=document.querySelector('.banner .text-2');

  function getCookie(key) {
      let cookie_arry=document.cookie.split('; ');
      console.log(document.cookie)
      for (let i=0;i<cookie_arry.length;i++){
             let  cookies=cookie_arry[i].split('=');
            if (cookies[0].trim()=== key){
                return cookies[1];
            }
      }
  }


    if(getCookie('username')){
        text_2.innerHTML=getCookie('username');

    }//出现问题一步步排查，别急。

/*
    (function(){
        resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
            recalc = function (){
                var cWidth = document.documentElement.clientWidth
                    || document.body.clientWidth;
                if (!cWidth) return;
                document.documentElement.style.fontSize = 100 * (cWidth / 750) + 'px';
            };
        if (!document.addEventListener) return;
        window.addEventListener(resizeEvt, recalc, false);
        document.addEventListener('DOMContentLoaded', recalc, false);
    })();*/
</script>
</body>
</html>